package com.hualan.sfzy.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PsycTestResult {
    private Integer id;
    private String score;
    private String resultContent;
    private Integer testId;
    private Integer userId;
    // 支持带时区的格式（如 2025-07-02T16:00:00.000Z）和空值
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", iso = DateTimeFormat.ISO.DATE_TIME)
    private Date time;
    private Integer del;

    private PsycTest psycTest;
    private SysUser sysUser;

    private String sort;

    // 新增时间段查询属性
    // 支持带时区的格式（如 2025-07-02T16:00:00.000Z）和空值
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", iso = DateTimeFormat.ISO.DATE_TIME)
    private Date startTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", iso = DateTimeFormat.ISO.DATE_TIME)
    private Date endTime;
}
